package com.esyoga.yoyoga.service;

import com.esyoga.yoyoga.pojo.DTO.TtrainerAgreementDTO;
import com.esyoga.yoyoga.pojo.TGymAgreement;
import com.esyoga.yoyoga.pojo.TTrainerAgreement;

import java.util.List;

/**
 * 场馆与教练之间的签约、场馆与平台之间的签约
 */
public interface AgreementService {

    /**
     * 根据场馆ID和教练ID查找签约成功的合约
     * @param gId
     * @param tId
     * @return
     */
    public List<TTrainerAgreement> selectByGIdAndTId(Integer gId, Integer tId);


    /**
     * 根据场馆ID查找签约成功和场馆和平台前和合约
     * @param gId
     * @return
     */
    List<TGymAgreement> selectByGId(Integer gId);

    /**
     * 根据教练ID和合约状态查找trainerAgreement
     * @param tId
     * @param aState
     * @return
     */
    List<TTrainerAgreement> selectAgreementBytIdAndaState(Integer tId, int aState);

    /**
     * 查找DTO
     * @param trainerAgreementList
     * @return
     */
    List<TtrainerAgreementDTO> selectTrainerAgreementDTO(List<TTrainerAgreement> trainerAgreementList);

    /**
     * 插入一条教练和场馆之间签订的合约
     * @param trainerAgreement
     * @return
     */
    int insertTrainerAgreement(TTrainerAgreement trainerAgreement);

    /**
     * 根据场馆ID和教练ID查找指定状态的合约
     * @param gId
     * @param tId
     * @param
     * @return
     */
    public List<TTrainerAgreement> selectByGIdAndTIdOnGoing(Integer gId, Integer tId, List<Integer> state);
}
